From: Florian Müllner Date: Sun, 21 Aug 2022 19:07:52 +0000 (+0200) Subject: screenshot: Only enable window screenshots when allowed by mode X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~452^2^2~42 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f9135cdc86bf64718e6d0f6f4747347d4ed4c388;p=gnome-shell.git screenshot: Only enable window screenshots when allowed by mode We currently don't take the session mode's `hasWindows` property into account when deciding whether window screenshots should be allowed. Right now that doesn't matter in practice, because all the ways to bring up the screenshot UI are blocked in those modes anyway. This is about to change though, so take the property into account to prevent an information leak. Part-of: --- diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index d82d7a7a6..e6ead6127 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -1469,7 +1469,9 @@ var ScreenshotUI = GObject.registerClass({ } this._windowButton.reactive = - windows.length > 0 && !this._castButton.checked; + Main.sessionMode.hasWindows && + windows.length > 0 && + !this._castButton.checked; if (!this._windowButton.reactive) this._selectionButton.checked = true;